package org.comanche.snaf.core.session;

public interface IoSession {
	/**
	 * write message to the remote peer IP, this operation is asynchronous,
	 * but now, it is synchronous
	 * @param message
	 */
	public void write(Object message);
	
	/**
	 * read message from remote peer IP, this operation is asynchronous,
	 * but now it is synchronous
	 * @return
	 */
	public Object read();
	/**
	 * 
	 * @param key
	 * @param obj
	 * @return
	 */
	public void setAttribute(Object key, Object obj);
	/**
	 * 
	 * @param key
	 * @return
	 */
	public Object getAttribute(Object key);
}
